In the real world, at any given time, many things are happen simultaneously. As more businesses and other organizations are transformed into digital form and more computers, including computers embedded in day-to-day appliances and devices (like cars, bicycles, clothes, coffee makers, etc.), are connected to the Internet or to private networks, it becomes more difficult to build high performance software services to address the increasing tendency for events to happen at the same time, including events should happen in a particular order. Events which happen in the “wrong” order or without regard to underlying logical or structural systems can create concurrency related hazards, such as if a person makes an appointment to be in two different places at the same time. Additional programming expertise and longer development time is generally required to deal with such concurrency related hazards in computer programs.
Historically, interpreted languages have been the choice to build software services. Interpreted languages give implementations some flexibility compared to compiled implementations and often make implementing programs easier. Building and executing interpreted programs may require an interpreted runtime environment (also referred to herein as runtime environment). The runtime environment comprises an interpreter, and may additionally comprise programming frameworks, network and other modules. A computer program interpreter (also referred to herein as “program interpreter” or “interpreter”) is a computer program that performs instructions written in an interpreted language (e.g. Java or ECMAScript) without previously compiling them into a machine language program. Programming frameworks provide a variety of functions to the interpreted programs such as access storage or encryption of data. Network modules provide network client and network service functions to interpreted programs in order to support interoperable machine-to-machine interaction over a network; runtime environments with network modules give interpreted programs the capability to share data and resources, exposing functions and distributing work. Runtime environments provide network functions in order to solve the problems of the connected world.
It is easier and faster to build programs that do not run concurrently; in other words, it is easier to build programs with execution steps that simply run one after another, sequentially. However, sequential programs produce relatively low-throughput and high-latency especially when IO operations (e.g. operations that transfer data to or from a computer via network or to or from a disk drive, etc.) are involved. In concurrent computing, several computations and IO operations may be executed during overlapping time periods concurrently rather than sequentially, by either interleaving the execution steps on a single processor core or running the computations in parallel on multiple processor cores. Parallel computing, on the other hand, uses multiple processor cores simultaneously to execute a program for better performance and hardware utilization. Parallel and concurrent computing require additional expertise and use of explicit programming techniques to get programs to work correctly, to work without concurrency related hazards, and to perform with high-throughput and low-latency.
Some concurrent programming languages, some concurrency related extensions of existing programming languages, and some programming paradigms (e.g. event driven programming paradigm) enabled by some runtime environments may reduce latency and increase throughput of program execution with additional expertise; however, they do not offer a simple solution to the problems caused by demand for performing a high volume of simultaneous computations. Such programs still generally produce low-throughput, high-latency, and underutilize hardware. In addition, concurrency related problems can still arise due to simultaneous accesses by programs to shared resources.
Additional expertise may help solve concurrency related problems; however, for software systems that are constantly being built and extended, additional expertise may not bring easy solutions to concurrency related problems. Solving concurrency related problems may introduce other problems, including but not limited to bottlenecks, low-throughput, high-latency, and underutilization of processors.